home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / RxMUI / Install < prev    next >
Encoding:
Text File  |  2001-09-23  |  8.3 KB  |  246 lines

  1. ; $VER: RxMUI_Install 13.0 (18.9.2001)
  2.  
  3. (procedure P_SetMessages
  4.  
  5.     (if (= "italiano" @language)
  6.         (
  7.             (set #WhatInstallPromptMsg            "Cosa vuoi installare?")
  8.             (set #WhatInstallHelpMsg            "Scegli cosa vuoi installare:\nLibrerie - tutte le librerie di RxMUI\nClassiMUI - alcune classi MUI\nUtilità - alcuni programmi d'utilità\nDocumentazione - la documentazione di RxMUI in formato HTML\nEsempi - macro d'esempio")
  9.  
  10.             (set #WhatInstallLibrariesMsg        "Librerie")
  11.             (set #WhatInstallMCCsMsg            "Classi MUI")
  12.             (set #WhatInstallUtilitiesMsg        "Utilità")
  13.             (set #WhatInstallDocumentationMsg    "Documentazione")
  14.             (set #WhatInstallExamplesMsg        "Esempi")
  15.  
  16.             (set #AskLibsDirPromptMsg            "Scegli la directory dove installare le librerie")
  17.             (set #AskLibsDirHelpMsg                "Nella directory che sceglierai, verranno copiate varie librerie e verrà creata una directory chiamata RxMUI, contenente le classi esterne. Ovviamente la directory scelta, dovrà essere nell'assegnamento logico LIBS:")
  18.  
  19.             (set #AskMCCsDirPromptMsg            "Scegli la directory dove installare alcuni classi MUI")
  20.             (set #AskMCCsDirHelpMsg                "Nella directory che sceglierai, verranno copiate alcune classi MUI. Ovviamente la directory scelta, dovrà essere nell'assegnamento logico LIBS:")
  21.  
  22.             (set #AskUtilitisDirPromptMsg        "Scegli la directory dove installare alcuni programmi d'utilità")
  23.             (set #AskUtilitiesDirHelpMsg        "Nella directory che sceglierai, verranno copiati alcuni piccoli programmi d'utilità, come rxs o rxhelp. Il posto migliore dove metterli è C:, ma qualsiasi altra drawer in path va bene.")
  24.  
  25.             (set #AskGuideDirPromptMsg            "Scegli la directory dove installare la documentazione di RxMUI")
  26.             (set #AskGuideDirHelpMsg            "Nella directory che sceglierai, verrà copiata la documentazione di RxMUI in formato HTML")
  27.  
  28.             (set #AskExamplesDirPromptMsg        "Scegli la directory dove installare alcune macro d'esempio di RxMUI")
  29.             (set #AskExamplesDirHelpMsg            "Nella directory che sceglierai, verranno copiate alcune macro d'esempio")
  30.  
  31.             (set #CopyingLibsMsg                "Sto copiando le librerie...")
  32.             (set #CopyingMCCsMsg                    "Sto copiando le classi MUI...")
  33.             (set #CopyingUtilitiesMsg            "Sto copiando programmi di utilità...")
  34.             (set #CopyingGuideMsg                "Sto copiando la documentazione...")
  35.             (set #CopyingExamplesMsg            "Sto copiando gli esempi...")
  36.         )
  37.         (
  38.             (set #WhatInstallPromptMsg            "What do you want to install?")
  39.             (set #WhatInstallHelpMsg            "Choose what you want to install:\n    Libraries - all the libraries needed by RxMUI to work\n    MUI classes - some MUI custom classes\n    Utilities - some little utilities progs\n    Documentation - RxMUI documentation in HTML\n    Examples - RxMUI ARexx macros")
  40.  
  41.             (set #WhatInstallLibrariesMsg        "Libraries")
  42.             (set #WhatInstallMCCsMsg            "MUI classes")
  43.             (set #WhatInstallUtilitiesMsg        "Utilities")
  44.             (set #WhatInstallDocumentationMsg    "Documentation")
  45.             (set #WhatInstallExamplesMsg        "Examples")
  46.  
  47.             (set #AskLibsDirPromptMsg            "Select the drawer where you want to copy libraries and RxMUI external classes")
  48.             (set #AskLibsDirHelpMsg                "In the drawer you supply here, there will be installed libraries and there will be created a drawer called rxmui, where external RxMUI classes reside. This drawer MUST BE in your LIBS: assignment")
  49.  
  50.             (set #AskMCCsDirPromptMsg            "Select the drawer where you want to copy some MUI classes")
  51.             (set #AskMCCsDirHelpMsg                "In the drawer you supply here, there will be installed some MUI classes. This drawer MUST BE in your LIBS: assignment")
  52.  
  53.             (set #AskUtilitisDirPromptMsg        "Select the drawer where you want to install some little utilities.")
  54.             (set #AskUtilitiesDirHelpMsg        "In the drawer you supply here, there will be installed some little utilities such as rxs, needed to launch macro from inetd and rxhelp, needed to obtain functions inline help. The best drawer to place them is C: ; anyway, it should be in your PATH")
  55.  
  56.             (set #AskGuideDirPromptMsg            "Select the drawer where you want to install RxMUI HTML documentation")
  57.             (set #AskGuideDirHelpMsg            "In the drawer you supply here, there will be installed the RxMUI documentation in HTML format")
  58.  
  59.             (set #AskExamplesDirPromptMsg        "Select the drawer where you want to install RxMUI examples macro")
  60.             (set #AskExamplesDirHelpMsg            "In the drawer you supply here, there will be installed some RxMUI examples ARexx macros")
  61.  
  62.             (set #CopyingLibsMsg                "Copying or Updating libraries")
  63.             (set #CopyingMCCsMsg                "Copying or Updating MUI classes")
  64.             (set #CopyingUtilitiesMsg            "Copying or Updating utilities")
  65.             (set #CopyingGuideMsg                "Copying documentation")
  66.             (set #CopyingExamplesMsg            "Copying examples")
  67.         )
  68.     )
  69. )
  70.  
  71. (procedure P_ChooseWhatIstall
  72.     (set #WhatInstall (askoptions (prompt #WhatInstallPromptMsg)
  73.                                     (help #WhatInstallHelpMsg)
  74.                                     (choices #WhatInstallLibrariesMsg #WhatInstallMCCsMsg #WhatInstallUtilitiesMsg #WhatInstallDocumentationMsg    #WhatInstallExamplesMsg)
  75.                          )
  76.      )
  77. )
  78.  
  79. (procedure P_AskLibsDir
  80.     (set #libsDir
  81.         (askdir
  82.                (prompt #AskLibsDirPromptMsg)
  83.                (help #AskLibsDirHelpMsg)
  84.                (default "LIBS:")
  85.           )
  86.      )
  87. )
  88.  
  89. (procedure P_AskMCCsDir
  90.     (set #MCCsDir
  91.         (askdir
  92.                (prompt #AskMCCsDirPromptMsg)
  93.                (help #AskMCCsDirHelpMsg)
  94.                (default "MUI:LIBS/MUI/")
  95.           )
  96.      )
  97. )
  98.  
  99. (procedure P_AskUtilitiesDir
  100.     (set #UtilitiesDir
  101.         (askdir
  102.                (prompt #AskUtilitisDirPromptMsg)
  103.                (help #AskUtilitiesDirHelpMsg)
  104.                (default "C:")
  105.           )
  106.      )
  107. )
  108.  
  109. (procedure P_AskGuideDir
  110.     (set #guideDir
  111.         (askdir
  112.            (prompt #AskGuideDirPromptMsg)
  113.            (help #AskGuideDirHelpMsg)
  114.            (default "Ram:")
  115.         )
  116.      )
  117. )
  118.  
  119. (procedure P_AskExamplesDir
  120.     (set #examplesDir
  121.         (askdir
  122.             (prompt #AskExamplesDirPromptMsg)
  123.                (help #AskExamplesDirHelpMsg)
  124.                (default "Ram:")
  125.           )
  126.      )
  127. )
  128.  
  129. (procedure P_CopyLibs
  130.     (working #CopyingLibsMsg)
  131.     (set #localLibsDir (tackon #source-dir "LIBS/"))
  132.     (foreach #localLibsDir "#?"
  133.           (copylib
  134.                (source (tackon #localLibsDir @each-name))
  135.                (dest #libsDir)
  136.           )
  137.      )
  138.  
  139.     (set #localRxmecLibsDir (tackon #source-dir "LIBS/RXMUI/"))
  140.     (set #installRxmecLibsDir (tackon #libsDir "RxMUI/"))
  141.     (if (= (exists #installRxmecLibsDir) 0)
  142.         (makedir #installRxmecLibsDir)
  143.     )
  144.     (foreach #localRxmecLibsDir "#?"
  145.           (copylib
  146.                (source (tackon #localRxmecLibsDir @each-name))
  147.                (dest #installRxmecLibsDir) (optional "nofail")
  148.           )
  149.      )
  150. )
  151.  
  152. (procedure P_CopyMCCs
  153.     (working #CopyingMCCsMsg)
  154.     (set #localMCCSDir (tackon #source-dir "MUI/"))
  155.     (foreach #localMCCsDir "#?"
  156.           (copylib
  157.                (source (tackon #localMCCsDir @each-name))
  158.                (dest #MCCsDir)
  159.           )
  160.      )
  161. )
  162.  
  163. (procedure P_CopyUtilities
  164.     (working #CopyingUtilitiesMsg)
  165.     (set #localUtilitiesDir (tackon #source-dir "C/"))
  166.     (foreach #localUtilitiesDir "#?"
  167.           (copylib
  168.                (source (tackon #localUtilitiesDir @each-name))
  169.                (dest #UtilitiesDir)
  170.           )
  171.      )
  172. )
  173.  
  174. (procedure P_CopyDocs
  175.     (working #CopyingGuideMsg)
  176.     (set #docsDir (tackon #source-dir (tackon "DOCS" @language)))
  177.     (if (= (exists #docsDir) 0)
  178.         (set #docsDir (tackon #source-dir "DOCS/english"))
  179.     )
  180.     (copyfiles
  181.         (source #docsDir)
  182.           (dest #guideDir)
  183.           (optional force askuser)
  184.           (all)
  185.      )
  186. )
  187.  
  188. (procedure P_CopyExamples
  189.     (working #CopyingExamplesMsg)
  190.     (copyfiles
  191.         (source (tackon #source-dir "EXAMPLES/"))
  192.           (dest #examplesDir)
  193.           (optional force askuser)
  194.           (all)
  195.      )
  196. )
  197.  
  198. (procedure P_CopyCatalogs
  199.     (set #catSourceDir (tackon #source-dir (tackon "Catalogs" @language)))
  200.     (set #catDestDir (tackon "Locale:" (tackon "Catalogs" @language)))
  201.     (if (= (and (= (exists (#catSourceDir)) 2) (= (exists (#catDestDir)) 2)) 1)
  202.         (foreach #catSourceDir "#?"
  203.               (copylib
  204.                    (source (tackon #catSourceDir @each-name))
  205.                    (dest #catDestDir)
  206.               )
  207.          )
  208.     )
  209. )
  210.  
  211. (set @default-dest "LIBS:")
  212. (set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon)) (expandpath @icon)))
  213.  
  214. (P_SetMessages)
  215.  
  216. (complete 0)
  217.  
  218. (P_ChooseWhatIstall)
  219.  
  220. (if (= 0 #WhatInstall) (exit))
  221. (if (BITAND #WhatInstall  1)  (P_AskLibsDir))
  222. (if (BITAND #WhatInstall  2)  (P_AskMCCsDir))
  223. (if (BITAND #WhatInstall  4)  (P_AskUtilitiesDir))
  224. (if (BITAND #WhatInstall  8)  (P_AskGuideDir))
  225. (if (BITAND #WhatInstall 16)  (P_AskExamplesDir))
  226.  
  227. (if (BITAND #WhatInstall  1)
  228.     (
  229.         (P_CopyLibs)
  230.         (P_CopyCatalogs)
  231.     )
  232. )
  233. (complete 30)
  234.  
  235. (if (BITAND #WhatInstall  2)  (P_CopyMCCs))
  236. (complete 35)
  237.  
  238. (if (BITAND #WhatInstall  4)  (P_CopyUtilities))
  239. (complete 40)
  240.  
  241. (if (BITAND #WhatInstall  8)  (P_CopyDocs))
  242. (complete 80)
  243.  
  244. (if (BITAND #WhatInstall 16)  (P_CopyExamples))
  245. (complete 100)
  246.